package kuaishou

// 客户端选项
type ClientOptions struct {
	AppKey      string
	AccessToken string
}

type ClientOption func(*ClientOptions)

func NewClientOptions(options ...ClientOption) ClientOptions {
	opts := ClientOptions{
		AppKey:      "",
		AccessToken: "",
	}
	for _, opt := range options {
		opt(&opts)
	}
	return opts
}

// WithAppKey set appkey for the client
func WithAppKey(appKey string) func(*ClientOptions) {
	return func(o *ClientOptions) {
		o.AppKey = appKey
	}
}

// WithAccessToken set access_token for the client
func WithAccessToken(accessToken string) func(*ClientOptions) {
	return func(o *ClientOptions) {
		o.AccessToken = accessToken
	}
}
